home *** CD-ROM | disk | FTP | other *** search
/ Star Trek Starfleet Academy Mini Omnipedia / MINI_OMNI.ISO / pc / omni_v2.dxr / 00372_Common User Events.ls < prev    next >
Encoding:
Text File  |  1996-04-15  |  3.1 KB  |  132 lines

  1. global oIndexScroller, gGlobalStepCount, gMACListenStatus, gInputField, gSearchState, gStatusField
  2.  
  3. on hStepPrev
  4.   global gYouClickedF, gModeState
  5.   if gModeState = #CHRO then
  6.     set gYouClickedF to 1
  7.   end if
  8.   hPlaceEntryRequest(-1)
  9. end
  10.  
  11. on hStepNext
  12.   global gYouClickedF, gModeState, gEditKeys
  13.   if gModeState = #CHRO then
  14.     set gYouClickedF to 1
  15.   end if
  16.   if gEditKeys then
  17.     if the shiftDown and the commandDown then
  18.       hReviseEntry()
  19.     end if
  20.   end if
  21.   hPlaceEntryRequest(1)
  22. end
  23.  
  24. on hLIneUp
  25.   mIndexBackLine(oIndexScroller)
  26.   repeat while the stillDown
  27.     mIndexBackLine(oIndexScroller)
  28.   end repeat
  29.   if gMACListenStatus then
  30.     hLoadIndextoLexicon()
  31.   end if
  32. end
  33.  
  34. on hLineDown
  35.   mIndexForwardLine(oIndexScroller)
  36.   repeat while the stillDown
  37.     mIndexForwardLine(oIndexScroller)
  38.   end repeat
  39.   if gMACListenStatus then
  40.     hLoadIndextoLexicon()
  41.   end if
  42. end
  43.  
  44. on hPageUp
  45.   mIndexBackPage(oIndexScroller)
  46.   repeat while the stillDown
  47.     mIndexBackPage(oIndexScroller)
  48.   end repeat
  49.   if gMACListenStatus then
  50.     hLoadIndextoLexicon()
  51.   end if
  52. end
  53.  
  54. on hPageDown
  55.   mIndexForwardPage(oIndexScroller)
  56.   repeat while the stillDown
  57.     mIndexForwardPage(oIndexScroller)
  58.   end repeat
  59.   if gMACListenStatus then
  60.     hLoadIndextoLexicon()
  61.   end if
  62. end
  63.  
  64. on hSearchRequest
  65.   global gEditKeys
  66.   if gEditKeys then
  67.     if the shiftDown and the commandDown then
  68.       hFindLinkInList()
  69.     else
  70.       if gSearchState = #word then
  71.         hFindThisWord()
  72.       else
  73.         if gSearchState = #ENTRY then
  74.           hFindThisEntry()
  75.         end if
  76.       end if
  77.     end if
  78.   else
  79.     if gSearchState = #word then
  80.       hFindThisWord()
  81.     else
  82.       if gSearchState = #ENTRY then
  83.         hFindThisEntry()
  84.       end if
  85.     end if
  86.   end if
  87. end
  88.  
  89. on hIndexClick pTheMseLn
  90.   global oIndexScroller, gModeState, oTextScroller, gYouClickedF, gEditKeys
  91.   if pTheMseLn > 0 then
  92.     if gModeState = #CHRO then
  93.       set gYouClickedF to 1
  94.     end if
  95.     mJumpIndex(oIndexScroller, pTheMseLn)
  96.     hMiniFind(1)
  97.     if gModeState = #CHRO then
  98.       mChroPicDispTest(oTextScroller, 1)
  99.     end if
  100.     if gEditKeys then
  101.       set vNtry to line pTheMseLn of field "BltIndexWin1"
  102.       if the controlDown and the commandDown then
  103.         hAttachRealEntry(vNtry)
  104.       end if
  105.     end if
  106.   end if
  107. end
  108.  
  109. on hSysAlert pMsg, dontClearString
  110.   global gSysStatusWordSpr, gStatusWordList, gModeState
  111.   set lit to getaProp(gStatusWordList, pMsg)
  112.   if not voidp(lit) then
  113.     set the castNum of sprite gSysStatusWordSpr to lit
  114.   end if
  115.   if dontClearString = 0 then
  116.     if (pMsg = #LCARSREADY) and not (gModeState = #FoundSet) then
  117.       set the text of cast gStatusField to " "
  118.     end if
  119.   end if
  120.   updateStage()
  121. end
  122.  
  123. on hInitSysAlertWords
  124.   global gSysStatusWordSpr, gStatusWordList
  125.   puppetSprite(gSysStatusWordSpr, 1)
  126.   set gStatusWordList to [:]
  127.   setaProp(gStatusWordList, #ACCESSING, the number of cast "SYS.ACCESSING")
  128.   setaProp(gStatusWordList, #MEDIALINK, the number of cast "SYS.MEDIALINK")
  129.   setaProp(gStatusWordList, #LCARSREADY, the number of cast "SYS.LCARSREADY")
  130.   setaProp(gStatusWordList, #null, the number of cast "PixelREF")
  131. end
  132.